package cn.iune.erp.inventory;

import java.math.BigDecimal;
import java.text.ParseException;
import java.util.List;
import com.alibaba.fastjson.JSONObject;

import cn.iune.common.base.IBizDataIface;

public interface IFileItemService extends IBizDataIface {

	List<FileItem> getAll();

	FileItem getByID(String fID);

	void delete(String fID);

	JSONObject save(JSONObject object) throws ParseException;

	//初始化物料档案中的低阶码
	int initItemLowLevel(String levelCode);

	//更新低阶码
	int updateLevelCode(FileItem fi, String levelCode);

	void beforeInsert(FileItem obj);

	void afterInsert(FileItem obj);

	void beforeDelete(String fID);

	void insert(FileItem obj);

	void update(FileItem obj);

	FileItem getByNo(String itemNo, String enterpriseNo);

	FileItem getByProperty(String groupID, String itemProperty);

	FileItem packing(String billType, String billTypeName, String cUsercode, String cUsername, String userId,
			String enterpriseNo, String enterpriseName);

	FileItem insert(String itemNo, String itemName, String itemProperty, String unitName, String cUsercode,
			String cUsername, String userId, String enterpriseNo, String enterpriseName);

	int updateStorage(String itemID, String storageID);

	List<FileItem> getSKUList(String fID);

	String getMaxSortNoPlus(String enterpriseNo);

	void deleteSKU(String fParent);

	JSONObject saveDetail(JSONObject object) throws ParseException;

	JSONObject newDataDetail(JSONObject param);

	JSONObject queryDataDetail(JSONObject param);

	FileItem getByBarcode(String barcode, String enterpriseNo);

	FileItem updateQuantityFrozen(String itemID, BigDecimal itemQuantityFrozen, BigDecimal pieceQuantityFrozen);

	List<FileItem> getList(String enterpriseNo);

	List<FileItem> getListByLevelCode(String levelCode, String enterpriseNo);

	List<FileItem> getProductList(String enterpriseNo);

	FileItem storeRegister(String itemID, BigDecimal itemQuantity, BigDecimal costingAmount, BigDecimal pieceQuantity);

	//更新标准成本（根据BOM表计算得出）
	int updateCostingStandard(String itemID, BigDecimal materialAmountPer, BigDecimal workingAmountPer,
			BigDecimal manufactAmountPer, BigDecimal processAmountPer, String enterpriseNo);

	FileItem pickRegister(String itemID, BigDecimal itemQuantity, BigDecimal costingAmount, BigDecimal pieceQuantity,
			int frozenFlag);

	JSONObject querySimple(JSONObject param, String ossServer);

	List<FileItem> filterByNo(String likeNo, String enterpriseNo);




}